home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr47 / asmpr100.zip / ASMPROC.TXT < prev    next >
Text File  |  1993-01-06  |  20KB  |  440 lines

  1.  
  2.  
  3.  
  4.                                    ASMPROC
  5.  
  6.                                  Revision 1.00
  7.  
  8.  
  9.                Copyright 1993 by Gordon Haff and Bit Masons Consulting.
  10.                               All rights reserved.
  11.  
  12.                                 Freeware program.
  13.  
  14.  
  15.           Command:  ASMPROC
  16.  
  17.           Purpose:  Print out procedure lists from your assembly language
  18.                     sources with the line numbers on which they start and
  19.                     the type of the procedure (e.g. near and far) if
  20.                     given.  The procedure names within a file can be
  21.                     sorted in alphabetical order or left in unsorted (line
  22.                     number) order.  Optionally, include files can also be
  23.                     processed.
  24.  
  25.                     Source code using Spontaneous Assembly syntax (i.e.
  26.                     .proc directives) is handled automatically.
  27.  
  28.                     Output is to stdout so can be redirected using
  29.                     standard DOS redirection to a file or printer.
  30.  
  31.                     Basically, the purpose is to give you a quick way of
  32.                     generating a listing of all your procedures without
  33.                     creating huge assembler cross-reference listings with
  34.                     a lot more information than you need.
  35.  
  36.           Syntax:   ASMPROC filenames [/i] [/s] [/?]
  37.  
  38.           Prereqs:  100% IBM Compatible PC running DOS 3.0 or higher
  39.  
  40.           Archive:  ASMPR100.ZIP
  41.  
  42.           New Feature Summary:
  43.  
  44.                     This is an initial release.
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.                                  ┌─────────┐
  52.                            ┌─────┴───┐     │              (tm)
  53.                          ──│         │o    │──────────────────
  54.                            │   ┌─────┴╨──┐ │  Association of
  55.                            │   │         │─┘  Shareware
  56.                            └───│    o    │    Professionals
  57.                          ──────│    ║    │────────────────────
  58.                                └────╨────┘    MEMBER
  59.  
  60.  
  61.           ASMPROC 1.00                                                2
  62.  
  63.  
  64.  
  65.                                      DISCLAIMER
  66.  
  67.           The author hereby disclaims all warranties relating to these
  68.           products, whether express or implied, including without
  69.           limitation any implied warranties of merchantability or fitness
  70.           for a particular purpose. The author cannot and will not be
  71.           liable for any special, incidental, consequential, indirect or
  72.           similar damages due to loss of data or any other reason, even if
  73.           the author or an authorized agent has been advised of the
  74.           possibility of such damages.  In no event shall the liability
  75.           for any damages ever exceed the price paid for the license to
  76.           use the software, regardless of the form and/or extent of the
  77.           claim.  The user of this program bears all risk as to the
  78.           quality and performance of the software.
  79.  
  80.                                        LICENSE
  81.  
  82.           ASMPROC is distributed as free, copyrighted software.  What
  83.           this means is that you can use these programs for as long as you
  84.           like without cost or obligation.  What you cannot do is to sell
  85.           this software or make a profit off of it (except as described
  86.           below) without the express written permission of the author.
  87.  
  88.           ASMPROC is the sole property of Gordon Haff.  This program may
  89.           be freely copied and transferred to individual parties.  It may
  90.           be posted on Bulletin Board systems (BBS) for electronic access
  91.           as long as NO FEE is charged for its distribution except for
  92.           private BBS operations that charge a regular user subscription
  93.           fee.  Computer information services such as Compuserve (CIS),
  94.           Genie, and Byte Information Exchange (BIX) are authorized to
  95.           post this product for subscriber access.  ASMPROC may be
  96.           distributed on diskette only by 1) disk distributors/vendors who
  97.           are associate members of the Association of Shareware
  98.           Professionals (ASP) or 2) users groups which do not charge more
  99.           than a nominal fee ($5) to cover the costs of distribution.  Any
  100.           changes to these policies must be made in writing by the author.
  101.  
  102.           This software is produced by a member of the Association of
  103.           Shareware Professionals (ASP).  The ASP wants to make sure that
  104.           the shareware principle works for you. If you are unable to
  105.           resolve a shareware-related problem with an ASP member by
  106.           contacting the member directly, ASP may be able to help. The ASP
  107.           Ombudsman can help you resolve a dispute or problem with an ASP
  108.           member, but does not provide technical support for members'
  109.           products.  Please write to the ASP Ombudsman at 545 Grover Rd.,
  110.           Muskegon, MI 49442-9427 or send a Compuserve message via
  111.           easyplex to ASP Ombudsman 70007,3536.
  112.  
  113.           ASMPROC 1.00                                                3
  114.  
  115.                                   TECHNICAL SUPPORT
  116.  
  117.  
  118.           Since this program is a freebie, unlike the shareware programs
  119.           for which I request a registration fee, I'm not going to make any
  120.           guarantees here with respect to bug fixes or other technical
  121.           support.  Having said that, I do like my programs to be as
  122.           bug-free as possible, so feel free to report any problems which
  123.           you run across.
  124.  
  125.  
  126.                Contact via:
  127.  
  128.                     Channel 1 BBS            (617) 354-8873
  129.                     Compuserve User ID#      72561,2637  (See Note 1)
  130.                     InterNet/ARPANET         72561.2637@compuserve.com
  131.  
  132.                     U.S. Mail                3205 Windsor Ridge Dr.
  133.                                              Westboro MA 01581
  134.                     Telephone                (508) 898-3321 (after 6pm
  135.                                                           Eastern time)
  136.  
  137.           The above are roughly in order of preference (i.e. how quickly
  138.           I'm likely to see your message and be able to respond).  I check
  139.           Channel One almost daily and the other electronic services at
  140.           least weekly in most cases.  In addition, I monitor the Interlink
  141.           and the PCRelay Shareware relays through Channel One.
  142.  
  143.           Note 1:
  144.           When contacting me via Compuserve, please use the Easyplex mail
  145.           system since I do not regularly monitor any of the IBM SIG
  146.           message bases.
  147.  
  148.           ASMPROC 1.00                                                4
  149.  
  150.  
  151.           1.0     Why ASMPROC?
  152.           --------------------
  153.  
  154.           I write a *lot* of assembler.  My Directory Freedom file
  155.           management utility (recently mentioned in PC Magazine, by the
  156.           way (*)) is something over 500K of source code spread across a
  157.           dozen or so files at this point.  Being a reasonably organized
  158.           programmer, this means many, many procedures all calling each
  159.           other in various and sundry and not always terribly organized
  160.           ways.  It gets HARD to keep track of all that stuff.
  161.  
  162.           Now, I know you're saying "BUT... my assembler has all those
  163.           fancy listing options and yours must too.  Why don't you just
  164.           use it and stop whining !?"
  165.  
  166.           Well, yes.  I do have a very nice assembler and lots of other
  167.           toys too from the good folks in Scotts Valley but it really
  168.           doesn't do what I want in this area.  I've concluded that the
  169.           real purpose of the listing options in TASM and other compilers
  170.           is to let you generate a volume of listing ten times the
  171.           original length of your source code with little work.  This
  172.           listing can then be used to convince your boss that you've
  173.           REALLY been working and not just testing out Nels Anderson's
  174.           latest game.
  175.  
  176.           In other words (to be serious for just a second), the assembler
  177.           listings are usually FAR more than I want.  In practice, I end
  178.           up grepping or searching a file with LIST to find what I need.
  179.           But I've often thought it would be real nice to have a simple
  180.           listing of the procedures that only took a few seconds to
  181.           generate and could be printed out without laying to waste huge
  182.           expanses of forest.
  183.  
  184.           So I sat down and churned out ASMPROC (in C++, not assembler
  185.           :-)).
  186.  
  187.  
  188.  
  189.  
  190.           (*) OK, so it was the Letters column but you have to start
  191.           somewhere. [Brought to you by Shameless Plugs, Inc.]
  192.  
  193.           ASMPROC 1.00                                                5
  194.  
  195.  
  196.           2.0     How does it Work?
  197.           -------------------------
  198.  
  199.           The syntax is as follows:
  200.  
  201.           ASMPROC filenames [/i] [/s] [/?]
  202.  
  203.           Switches may be in any order.  A - can be used in place of the /
  204.           for any UNIX junkies out there.  Filenames may include
  205.           wildcards.
  206.  
  207.           At a minimum, you have to enter one filename (including
  208.           extension).  Everything else is optional.
  209.  
  210.  
  211.           /i
  212.  
  213.           This instructs ASMPROC to process any include files.  So if you
  214.           have a file called FOO.ASM which has lines such as:
  215.  
  216.                INCLUDE FOOBAR.ASM
  217.                INCLUDE BLECH.ASM
  218.  
  219.           FOOBAR.ASM and BLECH.ASM will be processed just as if they were
  220.           included on the command line.
  221.  
  222.  
  223.           /s
  224.  
  225.           By default, ASMPROC displays procedures within a file in line
  226.           number order.  This switch instructs ASMPROC to sort instead in
  227.           procedure order (i.e. alphabetical).
  228.  
  229.  
  230.           /? (or /h or even just ?)
  231.  
  232.           Gives a brief help screen.
  233.  
  234.  
  235.  
  236.           ASMPROC 1.00                                                6
  237.  
  238.           As an example, the following command line:
  239.  
  240.           ASMPROC /s /i TESTASM.ASM > SAMPLE
  241.  
  242.           produced this output (in the file SAMPLE).  (DFATTR.ASM was
  243.           specified as an include file within TESTASM.ASM.)
  244.  
  245.  
  246.           ASMPROC 1.0  by Gordon Haff.  Copyright 1/93.
  247.                        type ASMPROC -? for help.
  248.  
  249.           testasm.asm:
  250.              init_mem                                  36      near
  251.              post_exec                                159      near
  252.              pre_exec                                  72      near
  253.  
  254.           dfattr.asm:
  255.              archive                                   28      near
  256.              attrib                                    83      near
  257.              chmod                                      7      near
  258.              getmod                                    17      near
  259.              hidden                                    54      near
  260.              read_only                                 41      near
  261.              system                                    69      near
  262.              update_attribute                         160      near
  263.  
  264.  
  265.           The numbers are the line numbers at which the procedures
  266.           started; i.e. the line on which the PROC keyword appeared.  All
  267.           the PROC's in these source code files were specified as NEAR.
  268.           The FAR and AUTO (used in Spontaneous Assembly) keywords are
  269.           also recognized for procedure types.
  270.  
  271.           That's about all there is to it.
  272.  
  273.  
  274.  
  275.           ASMPROC 1.00                                                7
  276.  
  277.           3.0       Special Features and Limitations
  278.           ------------------------------------------
  279.  
  280.           ASMPROC explicitly deals with the following constructs:
  281.  
  282.             o  Comment blocks using the COMMENT keyword
  283.             o  Spontaneous Assembly .PROC syntax
  284.             o  TASM Ideal Mode INCLUDE "filename" syntax
  285.             o  Standard ; (semicolon) comments
  286.  
  287.           This is the part where I get to document my way out of things I
  288.           didn't feel like doing.
  289.  
  290.           ASMPROC cannot handle the following:
  291.  
  292.             o  \ (Backslash) as a comment character.  (By not handle, I 
  293.                mean that the contents after the backslash would be parsed 
  294.                as code rather than a comment.  So a line like the 
  295.                following:
  296.                     mov  dx,ax     \ just like in proc foobar
  297.                would cause foobar to be interpreted as a procedure at this 
  298.                line.
  299.  
  300.             o  If you specify include directories from the assembler 
  301.                command-line, ASMPROC obviously has no way of knowing about 
  302.                these directories and hence it won't be able to find your 
  303.                include files
  304.  
  305.           ASMPROC did correctly (as far as I can tell) deal with over 500K
  306.           of my Directory Freedom assembly sources.  It is
  307.           case-insensitive and also generally insensitive to word ordering
  308.           in addition to explicitly dealing with the .proc keyword used by
  309.           Spontaneous Assembly.  It hasn't been torture-tested with every
  310.           sort of boundary condition but, as I say, it worked for me
  311.           across quite a range of files.  
  312.  
  313.           If you run across other assembler styles which ASMPROC doesn't
  314.           seem to handle properly and you send me a sample, I may make the
  315.           appropriate modificatiobs.  No guarantee, though, because I'm
  316.           not making any money off this and ASMPROC is, essentially, an
  317.           internal development tool.
  318.  
  319.  
  320.           4.0     Technical and Acknowledgments.
  321.           --------------------------------------
  322.  
  323.           ASMPROC 1.00 was developed using Borland C++ 3.1 and Container
  324.           Class libraries.  Some string routines that are part of the
  325.           Tesseract Development System from Innovative Data Concepts were
  326.           also used.
  327.  
  328.           The hardware environment was a homebrew 386 (named Dejah Thoris)
  329.           based on an AMI 20MHz full-size motherboard with a Micropolis
  330.           662MB ESDI disk and Ultrastore 12(F) ESDI controller.  It is a
  331.           dual monitor system with an Orchid Prodesigner 512KB VGA board
  332.           and an IBM MDA board.  It runs DOS 5.0.
  333.  
  334.           ASMPROC 1.00                                                8
  335.  
  336.  
  337.           5.0     Other Programs by Gordon Haff and Bit Masons Consulting:
  338.           -----------------------------------------------------------------
  339.  
  340.           Directory Freedom (DF):
  341.  
  342.               Offers users a fast, compact alternative to DOS Shells which
  343.             provides 1) selective file and directory operations; 2) a
  344.             scrollable environment for examining files and directories; 3)
  345.             user-defined keys which can operate upon highlighted files
  346.             (e.g. by defining an editor).  All this in a program which
  347.             takes less than 35KB since it is written in assembler! Easily
  348.             customized through an external configuration program. A "look-
  349.             and-feel" similar to PC Mag's DR, but does much more.  Now with
  350.             SmartViewers and many more exciting new features.
  351.                          Shareware: $25 Registration
  352.                          Latest version: 4.60 (DF460.ZIP)
  353.  
  354.  
  355.           the last word:
  356.  
  357.             'the last word' is a quotations trivia game in which 1 to 4
  358.             players compete against each other and their own high scores in
  359.             identifying the source of quotations and completing partial
  360.             quotes.  Most answers are entered free-form and are matched
  361.             against a set of acceptable responses with a sophisticated
  362.             pattern-recognition algorithm.  'the last word' runs in text
  363.             mode -- including on mono displays -- and offers a high level
  364.             of user configurability.
  365.                          Shareware: $15 Registration
  366.                          Latest version: 1.00  (LWORD100.ZIP)
  367.  
  368.  
  369.           CONVERT:
  370.  
  371.             Unit conversion calculator for Windows 3.0.  Comes with a data
  372.             file containing a large number of common (and not so common)
  373.             conversions in categories such as length, speed, pressure,
  374.             volume, and time.  The data file is a plain ASCII text file so
  375.             the user may add or delete units to best fit his individual
  376.             needs.
  377.                            Free, copyrighted software
  378.                            Latest version: 1.0  (CNVRT100.ZIP)
  379.  
  380.  
  381.  
  382.           ASMPROC 1.00                                                9
  383.  
  384.           X-Ray Viewers:
  385.  
  386.             The X-Ray Viewers provide a scrollable environment for
  387.             examining the contents of various types of archive files and
  388.             allows the user to view those contents by piping them to LIST.
  389.             In other words, you can read a text file contained within, for
  390.             example, a .ZIP file without extracting the archive.  In
  391.             combination with the SmartViewer functions in DF, the X-Ray
  392.             viewers make the examination of .ZIP, .ARJ, .LZH, and .ZOO
  393.             files almost automatic (just highlight a file and press
  394.             <Enter>).  "Freeware" but requires the appropriate archive
  395.             program and LIST to function.
  396.                            Free, copyrighted software
  397.                            Latest revision: 1.10  (XRAY110.ZIP)
  398.  
  399.  
  400.           Name Date (ND)
  401.  
  402.             This program can be set to a user-defined function key and
  403.             will rename the highlighted file to a new name which is
  404.             derived from the current date. For example, FILENAME.TXT would
  405.             be renamed to 891015.TXT if the date were Oct 15, 1989.  It
  406.             appends a letter to the base name (e.g. 891015A.TXT,
  407.             891015B.TXT, etc.) if the "dated name" already exists.  I find
  408.             this very useful for handling message-base files from BBS's.
  409.             Version 2.00 adds a great deal of flexibility with
  410.             command-line switches.
  411.                            Free, copyrighted software
  412.                            Latest revision: 2.0;
  413.                            Archive name: NAMD200.ZIP (ND200.ZIP on Compuserve)
  414.  
  415.  
  416.           MAKETEST:
  417.  
  418.             Command-line utility to create test files.  Lets you create
  419.             any number of test files with user-specified names and sizes.
  420.             Automatically can add characters to avoid duplicate names.
  421.             This is an easy way to create something like 100 zero-length
  422.             files.  Handy for users or programmers who want to test a
  423.             program's capabilities.
  424.                            Free, copyrighted software with QB source
  425.                            Latest version: 1.0  (MKTST100.ZIP)
  426.  
  427.  
  428.           These programs and others (Multi-Edit macros for use with Qmail
  429.           Deluxe, for example) are available on many fine bulletin boards.
  430.           The latest releases are always available on Channel One.   If you
  431.           just have to get a copy of one or more of these programs and
  432.           can't find one, however, I can send them out for a nominal media
  433.           and postage charge.
  434.  
  435.           ASMPROC 1.00                                               10
  436.  
  437.           6.0     History:
  438.           ---------------
  439.  
  440.           Rev. 1.00      Initial Release